
import { Vue, Component } from 'vue-property-decorator'
import PageContainer from '@/moduleC/components/layout/PageContainer.vue'
import { api } from '@/moduleC/api'
import store from '@/moduleC/store'
interface OrderInfo {
  title: string
  orderNo: string
  [key: string]: any
}

// 添加 SystemInfo 接口
interface SystemInfo {
  statusBarHeight: number
  [key: string]: any
}

@Component({
  components: {
    PageContainer
  }
})
export default class OrderDetails extends Vue {

 private commentContent: string = ''
 // private data: OrderInfo = uni.getStorageSync('_orderInfo')


  get orderInfo () : any{
  	return  store.state.orderDetail
  }
  goBack(): void {
    uni.navigateBack()
  }
  
  async submitComment(): Promise<void> {
    if (!this.commentContent.trim()) {
      uni.showToast({
        title: '请输入评论内容',
        icon: 'none'
      })
      return
    }
  
    uni.showLoading()
	store.dispatch('setStoreData',{
		_key: 'orderAdd',
		_val:  this.orderInfo.orderNo
	});
    // uni.setStorageSync('_ordercomment', this.orderInfo.orderNo)
    await new Promise(resolve => setTimeout(resolve, 1000))
    uni.navigateBack()
  }
}